import request from '@/utils/request'

// 解析视频链接
export function parseVideo(url) {
  return request({
    url: '/video/parse',
    method: 'post',
    data: { url }
  })
}

// 获取解析历史记录
export function getParseHistory(query) {
  return request({
    url: '/video/parse/history',
    method: 'get',
    params: query
  })
}

// 删除解析历史记录
export function deleteParseHistory(ids) {
  return request({
    url: '/video/parse/history',
    method: 'delete',
    data: { ids }
  })
}

// 获取支持的平台列表
export function getSupportedPlatforms() {
  return request({
    url: '/video/parse/platforms',
    method: 'get'
  })
}

// 获取解析统计数据
export function getParseStats() {
  return request({
    url: '/video/parse/stats',
    method: 'get'
  })
}